const resolve = dir => path.join(__dirname, dir);
module.exports = {
  publicPath: process.env.NODE_ENV === 'production' ? '././' : '/',
  devServer: {
    port: 8600,
    proxy: {
      '/prod-api/internet/': {
        target: 'http://139.196.221.112:8600/',
        changeOrigin: true,
        secure: false,
        pathRewrite: {
          '^/prod-api': ''
        }
      },
      '/prod-api/system/': {
        target: 'http://139.196.221.112:8600/',
        changeOrigin: true,
        secure: false,
        pathRewrite: {
          '^/prod-api': ''
        }
      },
      '/prod-api/auth/': {
        target: 'http://139.196.221.112:8600/',
        changeOrigin: true,
        secure: false,
        pathRewrite: {
          '^/prod-api': ''
        }
      },
    },
    hot: true,
    overlay: {
      warnings: false,
      errors: false,
    },
  },
};
